/**
 * 
 */
package com.local.guava.compare;

/**
 * @author admin
 *
 */
public class Man implements Comparable<Man>{
	private String name;
	private Double height;
	private Double salary;
	private Double penisLength;
	
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Double getHeight() {
		return height;
	}

	public void setHeight(Double height) {
		this.height = height;
	}

	public Double getSalary() {
		return salary;
	}

	public void setSalary(Double salary) {
		this.salary = salary;
	}

	public Double getPenisLength() {
		return penisLength;
	}

	public void setPenisLength(Double penisLength) {
		this.penisLength = penisLength;
	}

	public Man(String name, Double height, Double salary, Double penisLength) {
		super();
		this.name = name;
		this.height = height;
		this.salary = salary;
		this.penisLength = penisLength;
	}

	@Override
	public int compareTo(Man man) {
		
		int c1 = name.compareTo(man.name);
		if (c1 != 0){
            System.out.println("姓名一文一武牛逼牛逼");
            return c1;
        }
		int c2 = height.compareTo(man.height);
		if (c2 != 0){
            System.out.println("两个人的身高一个郭敬明一个姚明");
            return c2;
        }
		
		int c3 = salary.compareTo(man.salary);
		if (c3 != 0){
            System.out.println("两个人的薪水有点差距");
            return c3;
        }
		
		int c4 = penisLength.compareTo(man.penisLength);//判断到最后一个不要用if了
		System.out.println("两个人的JB有点吊");
		return c4;		
	}

}
